package com.shuaitao.newsystem.controller;

import com.shuaitao.newsystem.service.NewsService;
import net.sf.jsqlparser.statement.select.Top;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

@Controller
public class IndexController {
    @Autowired
    private NewsController newsController;
    @Autowired
    private TopicController topicController;
    @RequestMapping("/")
    public String index(HttpSession session) {
//        String html = newsController.getAllNews(session, 1, 0);
        newsController.getGroupNews(session);
        topicController.getAllTopic(session);
        return "index";
    }


}
